package com.ncloud.aaaa.model;
import java.io.Serializable;

import javax.persistence.Embeddable;

@SuppressWarnings("serial")
@Embeddable
public class UserRolePK implements Serializable{
    private Long userId = null;
    private Long roleId = null;
	public Long getUserId() {
		return userId;
	}
	public void setUserId(Long userId) {
		this.userId = userId;
	}
	public Long getRoleId() {
		return roleId;
	}
	public void setRoleId(Long roleId) {
		this.roleId = roleId;
	}
	
	@Override
	public int hashCode(){
		final int prime = 31;
        int result = 1;
        result = prime * result + ((userId == null) ? 0 : userId.hashCode());
        result = prime * result
                + ((roleId == null) ? 0 : roleId.hashCode());
        return result;
	}
   
	@Override
    public boolean equals(Object obj) {
		 if (this == obj)
             return true;
         if (obj == null)
             return false;
         if (getClass() != obj.getClass())
             return false;
         UserRolePK other = (UserRolePK) obj;
         if (userId == null) {
             if (other.userId != null)
                 return false;
         } else if (!userId.equals(other.userId))
             return false;
         if (roleId == null) {
             if (other.roleId != null)
                 return false;
         } else if (!roleId.equals(other.roleId))
             return false;
         return true;
	}
}